import * as PIXI from 'pixi.js'
import useMagic from '@renderer/store/modules/useMagicStore'
export default (data: Wx.Card.Data): PIXI.Container<PIXI.ContainerChild> => {
  const figureContainer = new PIXI.Container()
  // 攻击力
  const atk = new PIXI.Text({
    text: data.atk,
    style: {
      fontFamily: 'RZFont',
      fontSize: 45,
      fill: 0xffffff,
      align: 'center',
      stroke: {
        color: 0x000000,
        width: 4,
      },
    },
  })
  atk.anchor.set(0.5)
  figureContainer.addChild(atk)
  // 生命力
  const hp = new PIXI.Text({
    text: data.hp,
    style: {
      fontFamily: 'RZFont',
      fontSize: 45,
      fill: 0xffffff,
      align: 'center',
      stroke: {
        color: 0x000000,
        width: 4,
      },
    },
  })
  hp.anchor.set(0.5)
  hp.position.set(286.72, 0)
  figureContainer.addChild(hp)
  // 身材框与内框上边距: 254, 外框: 268, 槽高度: 58
  figureContainer.position.set(-useMagic().PICTURE_SCOPE / 2 + 4, 268 - 506 / 2 + 58 / 2)
  return figureContainer
}
